{ ----------------------------------------------------------------------------
  Amstrad Notepad emulator
  Copyright (c) Michael Nixon (Zipplet) 2011.
  http://www.zipplet.co.uk/
  Licensed under the MIT license, please see mit_license.txt in the
  documentation directory.

  Main form unit
  ---------------------------------------------------------------------------- }
unit unitfrmmain;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.Menus, notepad, Vcl.StdCtrls, notepadstate,
  globals;

type
  TfrmMain = class(TForm)
    PopupMenu: TPopupMenu;
    mnuAbout: TMenuItem;
    mnuExit: TMenuItem;
    Button1: TButton;
    procedure mnuExitClick(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmMain: TfrmMain;
  np: tnotepad;

implementation

{$R *.dfm}

{ ----------------------------------------------------------------------------
  Test button!
  ---------------------------------------------------------------------------- }
procedure TfrmMain.Button1Click(Sender: TObject);
begin
  self.Button1.Enabled := false;
  np := tnotepad.Create(eSystemNC100, 1024 * 64, 1024 * 256);
  np.hardReset;
end;

{ ----------------------------------------------------------------------------
  Popup menu -> Exit
  ---------------------------------------------------------------------------- }
procedure TfrmMain.mnuExitClick(Sender: TObject);
begin
  self.Close;
end;

end.
